﻿using System;
using System.Collections.Generic;
using System.Text;
using Oracle.DataAccess.Client;
using System.Data;

namespace HZ.DrugTrade.DAL
{
    public class DAL_OracleHelper
    {
        private static string ConnectionString;
        public DAL_OracleHelper()
        {
            ConnectionString = HZ.Data.DbHelperFactory.Create().ConnectionString;
        }
        public DAL_OracleHelper(string connectstring)
        {
            ConnectionString = connectstring;
        }
        /// <summary>
        /// 获取OracleCommand
        /// </summary>
        /// <returns></returns>
        public static Oracle.DataAccess.Client.OracleCommand OracleCommand()
        {
            return new Oracle.DataAccess.Client.OracleCommand();
        }
        /// <summary>
        /// 获取OracleConnection
        /// </summary>
        /// <returns></returns>
        public static Oracle.DataAccess.Client.OracleConnection OracleConnection()
        {
            return new Oracle.DataAccess.Client.OracleConnection(HZ.Data.DbHelperFactory.Create().ConnectionString);
        }
        /// <summary>
        /// 获取OracleConnection
        /// </summary>
        /// <param name="connectionString"></param>
        /// <returns></returns>
        public static Oracle.DataAccess.Client.OracleConnection OracleConnection(string connectionString)
        {
            return new Oracle.DataAccess.Client.OracleConnection(connectionString);
        }

    }
}
